<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>markov_marg_pdf</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="LIBIT Documentation"
HREF="index.html"><LINK
REL="UP"
HREF="refmanual.html"><LINK
REL="PREVIOUS"
TITLE="entropy_bin"
HREF="man.entropy-bin.html"><LINK
REL="NEXT"
TITLE="source_expectation"
HREF="man.source-expectation.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LIBIT Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man.entropy-bin.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man.source-expectation.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="MAN.MARKOV-MARG-PDF"
></A
>markov_marg_pdf</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN11510"
></A
><H2
>Name</H2
>markov_marg_pdf&nbsp;--&nbsp;stationary distribution of a Markov chain</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN11513"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN11514"
></A
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;it/source_func.h&gt;
      </PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vec markov_marg_pdf</CODE
>( mat pt
        );</CODE
></P
><P
></P
></DIV
></DIV
><H2
>DESCRIPTION</H2
><P
> This function returns the stationary probability density function of a Markov chain defined by its transition matrix pt. It uses the Froebenius theorem stating that this p.d.f. is obtained from the normalized eigen vector of <CODE
CLASS="PARAMETER"
>pt</CODE
> corresponing to the eigen value 1. </P
><H2
>RETURN VALUE</H2
><P
>    
   </P
><H2
>EXAMPLE</H2
><PRE
CLASS="PROGRAMLISTING"
>&#13;#include &lt;source_func.h&gt;

...

mat cpdf = mat_new(2,2);
cpdf[0][0] = 0.6; /* Pr(0|0) */
cpdf[1][0] = 0.4; /* Pr(1|0) */
cpdf[0][1] = 0.5; /* Pr(0|1) */
cpdf[1][1] = 0.5; /* Pr(1|1) */
                                                 /* cpdf = [ [ 0.6 0.5 ]
                                                             [ 0.4 0.5 ] ]   */
/* estimate the stationary law */
vec pdf = markov_marg_pdf(cpdf);                 /* pdf = [0.555 0.444]      */
                                                 /*     = [5/9 4/9]          */</PRE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man.entropy-bin.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man.source-expectation.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>entropy_bin</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="refmanual.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>source_expectation</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>